/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.dao;

import java.util.*;

import javacommon.base.*;
import cn.org.rapid_framework.page.*;

import com.smg.community.model.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


import org.springframework.stereotype.Repository;


@Repository
@SuppressWarnings("unchecked")
public class SmgKeywordDao extends BaseIbatis3Dao<SmgKeyword,java.lang.Integer>{
	
	@Override
	public String getIbatisMapperNamesapce() {
		return "SmgKeyword";
	}
	
	public void saveOrUpdate(SmgKeyword entity) {
		if(entity.getId() == null) 
			save(entity);
		else 
			update(entity);
	}
	
	public Page<SmgKeyword> findPage(SmgKeywordQuery query) {
		return pageQuery("SmgKeyword.findPage",query);
	}


	public List<SmgKeyword> getAllKeyword() {
		return this.getSqlSessionTemplate().selectList("SmgKeyword.getAllKeyword", null);
	}
	

}
